﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Newtonsoft.Json.Linq;


namespace PhoneClassLibraryJSON
{
    public class Ami:IAmi
    {
        public string Id
        {
            get;
            private set;
        }

        public string Name
        {
            get;
            private set;
        }

        public string Image
        {
            get;
            private set;
        }

        public Ami(JObject o)
        {
            this.Id = (string)o["id"];
            this.Name = (string)o["name"];
            this.Image = (string)o["image"];
        }

        public IAmi CreerAmi(JObject ami)
        {
            return new Ami(ami);
        }

        


    }
}
